﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ERPStore.Tests
{
	public class MockLeadSourceRegistrationService : ERPStore.Services.ILeadSourceRegistrationService
	{
		private List<ERPStore.Models.LeadSourceBase> m_LeadSourceList;

		public MockLeadSourceRegistrationService()
		{
			m_LeadSourceList = new List<ERPStore.Models.LeadSourceBase>();
		}

		public List<ERPStore.Models.LeadSourceBase> List
		{
			get
			{
				return m_LeadSourceList;
			}
		}

		public void RegisterLeadSource(ERPStore.Models.LeadSourceBase leadSource)
		{
			if (m_LeadSourceList.Any(i => i.Id == leadSource.Id))
			{
				return;
			}
			m_LeadSourceList.Add(leadSource);
		}
	}
}
